package com.igroupes.ovineherd.model.enums;

import com.igroupes.ovineherd.model.attribute.date.DateBasicAttribute;
import com.igroupes.ovineherd.model.attribute.date.DateTimeBasicAttribute;
import com.igroupes.ovineherd.model.attribute.date.MonthBasicAttribute;
import com.igroupes.ovineherd.model.attribute.date.TimeBasicAttribute;
import com.igroupes.ovineherd.model.attribute.enums.EnumModelData;
import com.igroupes.ovineherd.model.attribute.file.FileModelData;
import com.igroupes.ovineherd.model.attribute.file.ImageModelData;
import com.igroupes.ovineherd.model.attribute.id.IdAttribute;
import com.igroupes.ovineherd.model.attribute.number.*;
import com.igroupes.ovineherd.model.attribute.swirch.SwitchModelData;
import com.igroupes.ovineherd.model.attribute.text.*;

/**
 * 数据库基础字段
 */
public enum BeanTypeKey {
    SWITCH("SWITCH", SwitchModelData.class.getName(),"布尔","用于存储是否，对错，开关"),
    EMAIL("EMAIL", EMailModelData.class.getName() ,"邮箱",""),
//    PASSWORD( "PASSWORD",PasswordModelData.class.getName(),"密码",""),
    PHONE( "PHONE",PhoneModelData.class.getName() ,"手机号",""),
    TELEPHONE("TELEPHONE", TelephoneModelData.class.getName(),"电话号码","" ),
    NUMBER( "NUMBER", NumberModelData.class.getName(),"整数",""),
    AGE( "AGE",AgeModelData.class.getName() ,"年龄",""),
    IDCARD( "idCard", IdCardModelData.class.getName() ,"身份证号",""),
    POSTCODE( "postcode", PostcodeModelData.class.getName() ,"邮政编码",""),
    URL("URL", UrlModelData.class.getName() ,"链接",""),
    MONEY("MONEY", MoneyModelData.class.getName(),"金额","" ),
    UNKNOWNNUMBER("UNKNOWNNUMBER", UnknownNumberModelData.class.getName(),"数字","允许有小数" ),
    TEXT("TEXT", TextModelData.class.getName(),"短文本","" ),
    TEXTAREA( "TEXTAREA",TextareaModelData.class.getName() ,"大文本","用户存储文字长度特长的数据"),
//    ADDRESS( "ADDRESS",AddressModelData.class.getName(),"地址","用于存储地理位置，可以筛选省市区" ),
//    LOCATION("LOCATION", LocationModelData.class.getName(),"位置","用户存储地图的位置，经纬度" ),
    DATE( "DATE", DateBasicAttribute.class.getName() ,"日期",""),

    //TODO ----------一个字段包含多个字段类型暂时不使用----------- 20210321

//    DATERANGE( "DATERANGE", DateRangeModelData.class.getName() ,"日期范围",""),
    DATETIME( "DATETIME", DateTimeBasicAttribute.class.getName() ,"日期时间",""),
//    DATETIMERANGE( "DATETIMERANGE", DateTimeRangeModelData.class.getName() ,"日期时间范围",""),
    TIME( "TIME", TimeBasicAttribute.class.getName() ,"时间",""),
//    TIMERANGE( "TIMERANGE", TimeRangeModelData.class.getName() ,"时间范围",""),
    YEAR("YEAR", YearModelData.class.getName(), "年份", ""),
    MONTH("MONTH", MonthBasicAttribute.class.getName(), "月份", ""),
    ENUM("ENUM", EnumModelData.class.getName(),"枚举","固定数据" ),
    IMAGE( "IMAGE",ImageModelData.class.getName() ,"图片",""),
    FILE("FILE", FileModelData.class.getName(),"文件","" ),
    ID( "ID",IdAttribute.class.getName(),"流水号","生成唯一单号、编码" ),
//    JSON("JSON", JsonModelData.class.getName(),"JSON","繁杂类型数据，支持任意数据，但不参与检索，排序" ),
    ;
    private String key;
    private String bean;
    private String name;
    private String desc;
    BeanTypeKey(String key, String bean, String name, String desc){
        this.key = key;
        this.bean = bean;
        this.name = name;
        this.desc = desc;
    }

    public String getKey() {
        return key;
    }

    public String getBean() {
        return bean;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }
}
